<template>
  <div class="q-pa-md">
    <div class="q-gutter-y-md column" style="max-width: 300px">
      <t-input
        clearable

        color="purple-12"
        v-model="text"
        label="Label"
      />

      <!-- equivalent -->
      <t-input color="orange"  v-model="text" label="Label">
        <template v-if="text" v-slot:append>
          <t-icon
            name="cancel"
            @click.stop.prevent="text = null"
            class="cursor-pointer"
          />
        </template>
      </t-input>

      <!-- clear-icon -->
      <t-input
        clearable
        clear-icon="close"

        color="purple-12"
        v-model="text"
        label="Label"
      />
    </div>
  </div>
</template>

<script>
  import { ref } from 'vue';

  export default {
    setup() {
      return {
        text: ref('Some text'),
      };
    },
  };
</script>
